package com.example.myapplication2;

import android.content.Intent;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

public class selectorActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_selector);
        CharSequence text = getIntent()
                .getCharSequenceExtra(Intent.EXTRA_PROCESS_TEXT);
        System.out.println(text);
        if (text!=null){
            Toast.makeText(this, "得到意图", Toast.LENGTH_SHORT).show();
            Toast.makeText(this, text.toString(), Toast.LENGTH_SHORT).show();
        }
        Toast.makeText(this, "处理完毕", Toast.LENGTH_SHORT).show();
    }
}